﻿(function ($) {
    $(function () {
        initPage();

        var _modalManager;
        var _$form = null;

        this.init = function (modalManager) {
            _modalManager = modalManager;

            _$form = _modalManager.getModal().find('form[name=ObjectForm]');
            _$form.validate();
        };

        $("#GoToOrderItems").click(function () {
            alert("oo");
            if (!_$form.valid()) {
                return;
            }
            //var orderItemsURL = 'StudentApplys/OrderItemShoppingCart';
            //self.location = orderItemsURL;
        })
        
    });
})(jQuery);
//获取当前日期
function getCurrentDate() {
    var currDate = new Date();
    var str = "";
    str = currDate.toLocaleDateString();
    $("#OrderDate").val(str);
}
//下一步
var saveFirstURL = 'StudentApplys/Save1';
function goItemShoppingCart() {
    var secondHomeURL = 'StudentApplys/OrderItemShoppingCart';
    //window.location = secondHomeURL;

}

//输入名称，自动填充账号
function createAccount()
{
    $("#SName").keyup(function () {
        $("#Account").val($("#SName").val());
    })
}
function initPage()
{
    getCurrentDate();
    createAccount();
    $("#GoHome").click(function () {
        //alert("ok");
        var homeURL = 'Index';

        self.location = homeURL;
    })

    
    
}